import service from  '../service'


export function login(data) {
    return service({
        method :'post',
        url : '/auth/login',
        data
    })
}
export function buss_login(data) {
    return service({
        method :'post',
        url : '/buss/login',
        data
    })
}
export function user_login(data) {
    return service({
        method :'post',
        url : '/customer/login',
        data
    })
}
export function user_logout() {
    return service({
        method :'post',
        url : '/customer/logout',
    })
}
export function user_register(data) {
    return service({
        method :'post',
        url : '/customer/register',
        data
    })
}
export function logout() {
    return service({
        method :'post',
        url : '/auth/logout',
    })
}
export function buss_logout() {
    return service({
        method :'post',
        url : '/buss/logout',
    })
}
export function getHomeData() {
    return service({
        method :'post',
        url : '/auth/test',
    })
}
export function getBussData(data) {
    return service({
        method :'post',
        url : '/buss/info',
        data
    })
}
export function getBussMsgData(data) {
    return service({
        method :'post',
        url : '/buss/infomsg',
        data
    })
}
export function getProMsgData(data) {
    return service({
        method :'post',
        url : '/product/info',
        data
    })
}

export function getOrderMsgData(data) {
    return service({
        method :'post',
        url : '/order/info',
        data
    })
}

export function getCustMsgData(data) {
    return service({
        method :'post',
        url : '/customer/info',
        data
    })
}


export function setBussStatus(data) {
    return service({
        method :'post',
        url : '/buss/setStatus',
        data
    })
}
export function setProStatus(data) {
    return service({
        method :'post',
        url : '/product/setStatus',
        data
    })
}
export function updateProStatus(data) {
    return service({
        method :'post',
        url : '/product/update',
        data
    })
}
export function setBussStopStatus(data) {
    return service({
        method: 'post',
        url: '/buss/setStopStatus',
        data
    })
}
export function updataCustomerStatus(data) {
    return service({
        method: 'post',
        url: '/customer/updataCustomerStatus',
        data
    })
}

export function setImg(data) {
        return service({
            method :'post',
            url : '/product/upload',
            data
        })
}
// export function getImg(name) {
//     return service({
//         method :'get',
//         url : `/auth/download/${name}`
//     })
// }

// export function getOneCate(data) {
//     return service({
//         method :'post',
//         url : '/product/getOneCate',
//         data,
//     })
// }
export function getOneCate(data) {
    return service({
        method :'post',
        url : '/product/getOneCate',
        data
    })
}
export function getTwoCate(data) {
    return service({
        method :'post',
        url : '/product/getTwoCate',
        data
    })
}
export function addProduct(data) {
    return service({
        method :'post',
        url : '/product/addProduct',
        data
    })
}

export function updateWarehouse(data) {
    return service({
        method: 'post',
        url: '/product/updateWarehouse',
        data
    })
}
export function getProduct(data) {
    return service({
        method :'post',
        url : '/product/getProduct',
        data
    })
}
export function getPro(data) {
    return service({
        method :'post',
        url : '/product/getPro',
        data
    })
}

export function setShopCar(data) {
    return service({
        method :'post',
        url : '/shopcar/setShopCar',
        data
    })
}
export function getShopCarMsg(data) {
    return service({
        method :'post',
        url : '/shopcar/getMsg',
        data
    })
}
export function updateShopCar(data) {
    return service({
        method :'post',
        url : '/shopcar/updateShopCar',
        data
    })
}
export function deleteShopCar(data) {
    return service({
        method :'post',
        url : '/shopcar/deleteShopCar',
        data
    })
}
export function deleteAnyShopCar(data) {
    return service({
        method :'post',
        url : '/shopcar/deleteAnyShopCar',
        data
    })
}
